﻿/**
* 长方形节点。
*/
Ext.define('Happy.designer.Rectangle', {
    extend: 'Happy.designer.Node',

    /**
     * @inheritdoc
     */
    shapeType: 'rect',
    /**
     * @inheritdoc
     */
    defaultShapeConfig: {
        fill: '#FFC',
        stroke: '#000',
        'stroke-width': 2,
        radius: 5,
        x: 0,
        y: 0,
        width: 120,
        height: 60
    },

    /**
     * @inheritdoc
     */
    getShapeBox: function (shape) {
        return {
            x: shape.x,
            y: shape.y,
            width: shape.width,
            height: shape.height
        };
    }
});